-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fonctionnalités "attestation de service public" et "labellisation france services" #580
Conversation
3bd97a4
to
c497efc
Compare
a6ead7c
to
94e0c58
Compare
@christophehenry Ajouts récents : nettoyage du champ côté serveur + contraintes en base |
required=False, | ||
) | ||
|
||
public_service_delegation_attestation = FileField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En attendant de savoir comment on réimplémente la fonctionnalité, j'ai carrément supprimé le champ.
@@ -125,6 +126,20 @@ def __init__(self, **kwargs): | |||
"data-other-value": RequestOriginConstants.OTHER.value, | |||
}, | |||
) | |||
self.widget_attrs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attributs ajoutés sur les checkbox pour la gestion du JS
public_service_delegation_attestation = "" | ||
|
||
france_services_label = FuzzyChoice([True, False]) | ||
france_services_label = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'arrête les FuzzyChoice dans les factories, parce que ça fait des FuzzyTests après… Et déjà comme ça ce fut compliqué :D
@@ -21,26 +21,27 @@ | |||
|
|||
@tag("functional") | |||
class OrganisationRequestFormViewTests(FunctionalTestCase): | |||
def test_form_normal_organisation(self): | |||
def test_form_normal_organisation_with_fs_label(self): | |||
issuer: Issuer = IssuerFactory() | |||
request: OrganisationRequest = OrganisationRequestFactory.build( | |||
type_id=RequestOriginConstants.MEDIATHEQUE.value, | |||
public_service_delegation_attestation=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NPPT : virer cette ligne
@@ -308,7 +311,6 @@ def test_404_on_bad_issuer_id(self): | |||
def test_new_organisation_request_is_displayed_with_links(self): | |||
organisation = DraftOrganisationRequestFactory(issuer=self.issuer) | |||
response = self.client.get(self.get_url(self.issuer.issuer_id)) | |||
print(response.content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups (c'était ma faute)
cleaned_data.pop("is_private_org") | ||
cleaned_data.pop("france_services_label") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour explication : sans ces lignes-là, c'est comme si j'avais is_private_org = True
.
Une checkbox cochée dans un formulaire HTML, ça se détecte au fait que la clé est présente dans les données, quelle que soit la valeur associée.
aidants_connect_web/admin.py
Outdated
def get_readonly_fields(self, request, obj=None): | ||
readonly_fields = list(self.readonly_fields) | ||
if obj and obj.data_pass_id: | ||
readonly_fields.append("data_pass_id") | ||
return readonly_fields | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm je ne sais pas ce que ça fait là, ça.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Et hop, j'ai supprimé le commit, lalala
7153eb8
to
93aa9db
Compare
needed = is_private_org is True
89fa649
to
cabd264
Compare
🌮 Objectif
🔍 Implémentation
🖼️ Images